package com.ssl.order.fegin;

import com.ssl.order.pojo.OderPageRequest;
import com.ssl.order.pojo.OrderSubmitRequest;
import com.ssl.order.pojo.OrderWareLockResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("ware-service")
public interface WareServiceClient {
    @RequestMapping("/ware/calculateFreight")
    Integer calculateFreight(@RequestBody List<OderPageRequest> oderPageRequests);

    @RequestMapping("/ware/lockWare")
    List<OrderWareLockResponse> lockWare(@RequestBody OrderSubmitRequest orderSubmitRequest);

    @RequestMapping("/ware/releaseWare")
    Boolean releaseWare(@RequestParam String orderId);
}
